package com.xdqzy.baseline.demo.service;

import com.xdqzy.baseline.common.annotation.CacheParam;
import com.xdqzy.baseline.demo.controller.param.req.AddProductReq;
import com.xdqzy.baseline.demo.controller.param.req.ProductIdReq;
import com.xdqzy.baseline.demo.controller.param.resp.ProductDemoResp;
import com.xdqzy.baseline.demo.model.ProductDemoModel;
import com.baomidou.mybatisplus.extension.service.IService;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author qss
 * @since 2020-11-15
 */
public interface ProductDemoService extends IService<ProductDemoModel> {

    /**
     * 根据id查询商品
     * @param id
     * @return
     */
    ProductDemoResp getProduct(String id);

    /**
     * 创建商品
     * @param addProductReq
     */
    ProductDemoResp addProduct(AddProductReq addProductReq);

    /**
     * 删除商品
     * @param id
     */
    void deleteById(@CacheParam String id);

}
